<template>
    <a-card :bordered="false">
        <LTable
        ref="logList"
        size="middle"
        rowKey="keyId"
        :formAttributes="formAttributes"
        :columns="columns"
        axiosUrl="/SysOperLogController/page"
        :showPagination="true"
        :showQueryForm="true"
        :initQuery="initQuery"
        :initOrder="initOrder"
      >
    
        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record,'logForm',record.operDes)">详细</a>
        </span>
        
    </LTable>
    <logForm ref="logForm" ></logForm> 
    </a-card>
</template>

<script>
import LTable from '@/components/lt/LTable'
import logForm from './logForm'
import {SysMixin} from '@/mixins/SysMixin'
import defaultSettings from '@/config/defaultSettings'

export default {
    name:'logList',
    components:{
       LTable,logForm
    },
    mixins:[SysMixin],
    data(){
        return{
            defaultSettings,
            formAttributes:[
                {field:'systemNo',label:'系统编号',component:'input',condition:'like'},
                {field:'operTime',label:'操作时间',component:'time',condition:'between'},
                {field:'operMethod',label:'操作方法',component:'input',condition:'like'},
                {field:'operDes',label:'描述',component:'input',condition:'like'},
            ],
            initQuery:[{field:'systemNo',val:defaultSettings.systemNo}],
            initOrder:[{field:'operTime',val:'desc'}],
            columns:[
                {
                    title: '序号',
                    dataIndex: '',
                    key:'rowIndex',
                    width:60,
                    align:"center",
                    customRender:function (t,r,index) {
                      return parseInt(index)+1;
                    }
                },
                
                {
                    title: '系统编号',
                    dataIndex: 'systemNo'
                },
                {
                    title: '操作描述',
                    dataIndex: 'operDes'
                    
                },
                {
                    title: '操作人',
                    dataIndex: 'operEmpName'
                },
                {
                    title: '操作方法',
                    dataIndex: 'operMethod'
                },
                {
                    title: '请求地址',
                    dataIndex: 'operUrl'
                },
                {
                    title: '请求Ip',
                    dataIndex: 'operIp'
                },
                {
                    title: '请求时间',
                    dataIndex: 'operTime'
                },
                {
                    title: '操作',
                    dataIndex: 'action',
                    width: '120px',
                    scopedSlots: { customRender: 'action' }
                }
            ],
            
        }
    },
    created(){
       
    },
    methods:{
        
        
    }
}
</script>